package cn.springcloud.fix.server.api.message.feign;

import cn.springcloud.fix.common.core.base.HeaderInfo;
import cn.springcloud.fix.server.api.message.feign.fallback.MessageServiceFallBack;
import cn.springcloud.fix.server.api.message.request.*;
import cn.springcloud.fix.server.api.message.response.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "springcloud-server-message", path = "/server/message", fallback = MessageServiceFallBack.class)
public interface MessageService {

    @PostMapping("/addMessage")
    MessageAddResponse addMessage(@RequestBody MessageAddRequest request, HeaderInfo headerInfo);

    @PostMapping("/delMessage")
    MessageDeleteResponse delMessage(@RequestBody MessageDeleteRequest request, HeaderInfo headerInfo);

    @PostMapping("/getMessageById")
    MessageGetByIdResponse getMessageById(@RequestBody MessageGetByIdRequest request, HeaderInfo headerInfo);

    @PostMapping("/messageList")
    MessageListResponse messageList(@RequestBody MessageListRequest request, HeaderInfo headerInfo);

    @PostMapping("/updateMessage")
    MessageUpdateResponse updateMessage(@RequestBody MessageUpdateRequest request, HeaderInfo headerInfo);
}
